home *** CD-ROM | disk | FTP | other *** search
- name Maho XY Plane G18 Sub Program
-
- ! 00
- % 00
- O >4 N Add 9100
- N >9
- G >2
- o >4 N Add 9100
- B ->3.>4
- b ->3.>4 B
- X ->3.>4
- x ->3.>4 X
- Z ->3.>4 Mult -1
- z ->3.>4 Z Mult -1
- Y ->3.>4
- y ->3.>4 Y
- I ->3.>4
- i ->3.>4 I
- J ->3.>4
- K ->3.>4 Mult -1
- k ->3.>4 K
- F >4
- T >2
- M >2
- S >4
- W 00
-
- ModalLetters X Z Y F B # List of letters that are modal
-
- ModalGs 0 1 2 3 81 83 84 # List of g codes that are modal
-
- Sequence#s N 1 1 1 # Char, freq, incr & start
- First#? N # Y or N 'Output 1st sequence no.
- Last#? N # Y or N 'Output last sequence no.
-
- HCode X # X or X U 'Horizontal char.
- VCode Z # Y or Y V 'Vertical char.
- Dcode Y # Depth char.
- FeedCode F # Feed rate char.
-
- Comment ( ) # Begin End comment char.
-
- Spindle 3 4 5 # Cw, ccw & stop m codes
- Coolant 8 9 7 # On, Off & Mist m codes
- DComp 41 42 40 # Left, Right & Cancel m codes
- LComp 43 49 # On & Off codes
-
- Feed G1 # Linear move
- Rapid G0 # Rapid positioning word
- Cw G2 # Circular move clockwise
- Ccw G3 # Circular move counter clockwise
-
- Inc/Abs G 91 90 # Inc & Abs char. & values
-
- CtrCode I K # I J or R or I J K L
- Helical? N
-
- Spaces? Y # Y or N 'Spaces between words
-
- Incremental? N # Y or N 'Inc or abs output
- CtrIncremental? N # Y or N 'Inc or abs I & J
- ByQuadrants? N # Y or N 'Break arcs at quadrants
-
- Inch/MM 70 71 # Inch & Metric g codes
-
- Subs1st? N # Y or N 'Orders main & sub programs
-
- RenumSubs? Y # Y or N 'Resets sub's sequence no.
-
- UppercaseComments? Y # Y or N 'Require uppercase comments
-
- Drill 2 # Drilling canned/manual cycle
- G81 z[Depth] b[Rplane] S[Speed] F[Frate] M13 y2
- G79 X[H] Z[V] Y[PointD]
- G79 X[H] Z[V] Y[PointD]
- end
-
- Peck 2 # Pecking canned/manual cycle
- G83 z[Depth] b[RPlane] S[Speed] F[Frate] M13 y2 k[VBite]
- G79 X[H] Z[V] Y[PointD]
- G79 X[H] Z[V] Y[PointD]
- end
-
- Tap 2 # Tapping canned/manual cycle
- G84 z[Depth] b[RPlane] S[Speed] F[Frate] M13 y2
- G79 X[H] Z[v] Y[PointD]
- G79 X[H] Z[v] Y[PointD]
- end
-
- Ream 2 # Reaming canned/manual cycle
- G85 z[Depth] b[RPlane] S[Speed] F[Frate] M13 y2
- G79 X[H] Z[V] Y[PointD]
- G79 X[H] Z[V] Y[PointD]
- end
-
- Bore 2 # Boring canned/manual cycle
- G86 z[Depth] b[Rplane] S[Speed] F[Frate] M13 y2
- G79 X[H] Z[V] Y[PointD]
- G79 X[H] Z[V] Y[PointD]
- end
-
- Back # Back boring canned/manual cycle
- end cancel
-
- Cancel # Cancel a canned/manual cycle
- G80
- end
-
- StartCode # Start of the program
- !0 %0
- !0 O[Program#]
- G[unitmode]
- End
-
- 1stToolChange # First tool change
- G18 T[Tool] M[Val6]
- G51
- G52
- G53
- G[Val8]
- G90
- G0 X[H] Z[V] Y[D] S[Speed] F[FRate] M13
- End
-
- Infeed # Enable cutter comp
- G1 Y[D] F[Plunge]
- G43 X[H] Z[V] F[FRate]
- G[Side]
- end
-
- Outfeed # Disable cutter comp
- G40
- G1 X[H] Z[V]
- end
-
- ToolChange # Secondary tool changes
- G0 Y[Val7]
- T[Tool] M[Val6]
- G0 X[H] Z[V] Y[D] S[Speed] F[FRate] M13
- End
-
- LineCode # Linear move
- G1 X[H] Z[V] Y[D] F[Frate]
- End
-
- RapidCode # Rapid move
- G0 X[H] Z[V] Y[D]
- End
-
- CwCode # CW circular move
- G2 X[H] Z[V] I[IVal] K[JVal] F[Frate]
- End
-
- CcwCode # CCW circular move
- G3 X[H] Z[V] I[IVal] K[JVal] F[Frate]
- End
-
- Between # Between the main and sub programs
- G0 Y[Val7]
- G53
- M30
- !0 W0
- End
-
- SubCall # Call a sub program
- G[Work] X[H] Z[V]
- G22 o[Sub]
- End
-
- SubStart # Start of the sub program
- !0 %0
- !0 o[Sub]
- End
-
- SubEnd # End of the sub program
- M02
- !0 W0
- End
-
- Ask [Val7] " Enter clearance for toolchange in Y : " "100"
- Ask [Val6] " Enter M-function for toolchange : " "6"
- Ask [Val8] " Enter Offset number : " "54"
-
- Replace "%" with "%PM"
-